//
//  TZTabbarVC.m
//  OurFramework
//
//  Created by 949699582 on 2019/7/17.
//  Copyright © 2019 com.cunyin.paywaiter. All rights reserved.
//

#import "TZTabbarVC.h"
#import "BaseNavigationController.h"
#import "TZVC1.h"
#import "TZVC2.h"
#import "TZVC3.h"
@interface TZTabbarVC ()

@end

@implementation TZTabbarVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
//    TZVC1 *vc1 = [[TZVC1 alloc] init];
//    TZVC2 *vc2 = [[TZVC2 alloc] init];
//    TZVC3 *vc3 = [[TZVC3 alloc] init];
//    
//    BaseNavigationController *nav1 = [[BaseNavigationController alloc] initWithRootViewController:vc1];
//    BaseNavigationController *nav2 = [[BaseNavigationController alloc] initWithRootViewController:vc2];
//    BaseNavigationController *nav3 = [[BaseNavigationController alloc] initWithRootViewController:vc3];
//    
//    self.viewControllers = @[nav1, nav2, nav3];
    [self setTabBarItems:self];
}


- (void)setTabBarItems:(UITabBarController*)tabBarVC
{
    NSArray *titles = @[@"页面1", @"页面2", @"页面3"];
    NSArray *normalImages = @[@"mine", @"mine", @"mine"];
    NSArray *highlightImages = @[@"mineHighlight", @"mineHighlight", @"mineHighlight"];
    [tabBarVC.tabBar.items enumerateObjectsUsingBlock:^(UITabBarItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        obj.title = titles[idx];
        obj.image = [[UIImage imageNamed:normalImages[idx]] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        obj.selectedImage = [[UIImage imageNamed:highlightImages[idx]] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    }];
}


@end
